Integration By Substitution (or U-sub) is a powerful technique to solve integrals

Think of it as the inverse of the chain rule (for derivatives)

U-sub is used to solve integrals in the form of

$$\begin{align} \int{g'(x)f'(g(x))\ dx} \end{align}$$

If you notice, the inner part is the output of the chain rule

By transforming it into an integral in the form of

$$\begin{align} \int{f'(u)\ du} \end{align}$$

What we did was to replace the $g(x)$ with a variable $u$ and replace the $g'(x)\ dx$ with $du$

Then we solve the integral like normal with $u$ as the variable

At the end we replace the $u$ in our answer with our $g(x)$ that we had substituted earlier to make our answer in terms of $x$ (and not $u$)

We can also represent U-sub using Leibniz notation

$$\begin{align} \int{f(x) \ dx} = \int{f(x) \frac{dx}{du} \ du} \end{align}$$

The way we convert to $du$ is by using Differentials, $\frac{dy}{dx} = f'(x) \rightarrow dy = f'(x) \ dx$

Also important to note, using differentials is just arbitrary notation, it just makes it easier to deal with converting $dx \rightarrow du$

It's important to note that when you convert from $dx$ to $du$, all the variables in the integrand need to be in the form of $u$

The variable $u$ is not important either, it can be any variable such as $v$, $p$, $\theta$, etc...


Examples

$$\begin{align} \int{6x^2(2x^3 +1)^3dx} \end{align}$$

Here, our inner function is inside the parentheses, so we should take $u = 2x^3 + 1$

$$\begin{align} &\int{6x^2(2x^3 +1)^3dx} \\ u &= 2x^3+1 \\ \frac{du}{dx} = 6x^2 &\rightarrow du = 6x^2dx \end{align}$$

Then we replace our new terms in the integrand

$$\begin{align} &\int{u^3du} \\ &\frac{u^4}{4} + C \\ &\frac{(2x^3 +1)^4}{4} + C \\ \int{6x^2(2x^3 +1)^3dx} &= \frac{(2x^3 +1)^4}{4} + C \end{align}$$


Lets do another example

$$\begin{align} &\int{xe^{x^2}dx} \\ u &= x^2 \\ du &= 2xdx \end{align}$$

Now here, we don't have a $2x$ to replace, but we do have an $x$, so we can cleverly use integration properties to our advantage

We can introduce a $2x$ by putting a $2$ inside the integral and a $\frac{1}{2}$ outside the integral

Another thing we can do is divide $du$ by $2$ so the right-hand side is in the form of $xdx$

$$\begin{align} \frac{1}{2}&\int{2xe^{x^2}dx} \\ \frac{1}{2}&\int{e^{u}du} \\ \end{align}$$

OR

$$\begin{align} du &= 2xdx \\ \frac{du}{2} &= xdx \\ &\int{e^{u}\frac{du}{2}} \\ \frac{1}{2}&\int{e^udu} \end{align}$$

Both ways are fine because they ultimatley achieve the same goal, you can use this technique if there some constant coefficient

$$\begin{align} \frac{1}{2}&\int{e^udu} \\ \frac{1}{2}&\left(e^u\right) + C \\ &\frac{e^{x^2}}{2}+ C \\ \end{align}$$


U-Sub With Definite Integrals

When you do U-Sub with definite integrals, you either need to solve the indefinite integral and use the FTC

Or you need to change the bounds of the integral

The way you change the bounds is by plugging the bound into the x in your subsitution

For example

$$\begin{align} &\int_{1}^{e}{\frac{ln(x)}{x}dx} \\ u &= ln(x) \\ du &= \frac{1}{x}dx \end{align}$$

To change the bounds, plug them into $u$

$$\begin{align} &\int_{x=1}^{x=e}{\frac{ln(x)}{x}dx} \\ x = 1 &\rightarrow u = ln(1) = 0 \\ x = e &\rightarrow u = ln(e) = 1 \\ &\int_{u=0}^{u=1}{udu} \\ &\int_{0}^{1}{udu} \\ &\int_{0}^{1}{udu} \\ &\left[\frac{u^2}{2}\right] \biggr\vert_{0}^{1} \\ \left[\frac{1^2}{2}\right] &- \left[\frac{0^2}{2}\right]\\ \int_{1}^{e}{\frac{ln(x)}{x}dx} &= \frac{1}{2} \end{align}$$


Practice Problems